﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using PowerArrow.nasa.View.Compont;

namespace PowerArrow.nasa.View
{
	public partial class PlayGround : UserControl
	{
		public PlayGround()
		{
			// Required to initialize variables
			InitializeComponent();
		}

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            System.Windows.Data.Binding backbind = new System.Windows.Data.Binding("BackgroundStatus");
            backbind.Mode = System.Windows.Data.BindingMode.TwoWay;
            xBackGround.SetBinding(BackGround.StatusProperty, backbind);

            System.Windows.Data.Binding backChkbind = new System.Windows.Data.Binding("ChkResult");
            backChkbind.Mode = System.Windows.Data.BindingMode.TwoWay;
            xBackGround.SetBinding(BackGround.ChkResultProperty, backChkbind);

            System.Windows.Data.Binding backlevelbind = new System.Windows.Data.Binding("Level");
            backlevelbind.Mode = System.Windows.Data.BindingMode.TwoWay;
            xBackGround.SetBinding(BackGround.LevelProperty, backlevelbind);

            System.Windows.Data.Binding arrViewbind = new System.Windows.Data.Binding("ArrStatus");
            arrViewbind.Mode = System.Windows.Data.BindingMode.TwoWay;
            xArrow.SetBinding(Arrow.StatusProperty, arrViewbind);

            System.Windows.Data.Binding arrFirebind = new System.Windows.Data.Binding("OnFire");
            arrFirebind.Mode = System.Windows.Data.BindingMode.TwoWay;
            xArrow.SetBinding(Arrow.FireProperty, arrFirebind);

            System.Windows.Data.Binding arrShowbind = new System.Windows.Data.Binding("ShowArrow");
            arrShowbind.Mode = System.Windows.Data.BindingMode.TwoWay;
            xArrow.SetBinding(Arrow.IsShowProperty, arrShowbind); 
        }
	}
}